<extend name="Public/List/Common"/>
<block name="pageHeader">
    <include file="Public/List/Header/header.search.add.batchDel" add-title="添加分类"/>
</block>
<block name="pageContent">
<div class="bjui-pageContent tableContent">
  <table data-toggle="tablefixed" data-width="100%" data-nowrap="true">
    <thead>
      <tr>
        <th width="26"> <input type="checkbox" class="checkboxCtrl" data-group="ids" data-toggle="icheck">
        </th>
        <th data-order-field="id">编号</th>
        <th>分类名称</th>
        <th>分类标识</th>
        <th>指定阅读权限</th>
        <th data-order-field="sort">排序</th>
        <th>操作</th>
      </tr>
    </thead>
    <tbody>
      <?php if(@$tree)foreach($tree as $arr):?>
      <tr data-id="{$arr.id}">
        <td><input type="checkbox" name="ids" data-toggle="icheck" value="{$arr.id}"></td>
        <td>{$arr.id}</td>
        <td>{$arr.title}</td>
        <td>{$arr.name}</td>
        <td>
          <if condition="$arr.permissions eq 0">
            普通用户
            <elseif condition="$arr.permissions eq 1"/>
            初级会员
          </if>
        </td>
        <td>{$arr.sort}</td>
        <td>
          <a <php>echo display(CONTROLLER_NAME.'/edit');</php> href="{:U('edit?id='.$arr['id'].'&pid='.$arr['pid'])}" class="btn btn-green" data-toggle="dialog" data-id="dialog-normal" data-mask="true" data-title="{$arr.title}-编辑">编辑</a>
  		    <a <php>echo display(CONTROLLER_NAME.'/remove');</php> href="{:U('remove?id='.$arr['id'])}" class="btn btn-red" data-toggle="doajax" data-confirm-msg="确定要删除该行信息吗？">删</a>
          <a <php>echo display('Article/index');</php> href="{:U('Article/index?cate_id='.$arr['id'].'&navTabId=CategoryArticle'.$arr['id'])}" data-id="CategoryArticle{$arr.id}" class="btn btn-blue" data-toggle="navtab" data-title="{$arr.title}文章管理">管理</a>
        </td>
      </tr>
      <?php endforeach;?>
    </tbody>
  </table>
</div>
</block>
<block name="pageFooter"></block>
